﻿@model IEnumerable<FILSTARTUPS_CMS.Models.Role>

@{
    WebGrid webGrid = new WebGrid(canSort: true, canPage: true, rowsPerPage: 10, ajaxUpdateContainerId: "grid");
    webGrid.Bind(Model, autoSortAndPage: true, rowCount: Model.Count());
    
 }

 <div id="grid">
 @webGrid.GetHtml(htmlAttributes: new { id = "grid" },
alternatingRowStyle: "altrow",
mode: WebGridPagerModes.All,
    firstText: "<<first",
    previousText: "<previous",
    nextText: "next >",
    lastText: "last >>",
    columns: webGrid.Columns(
    webGrid.Column("Role", "Role", format: @<span class="rolename"><b>@item.Rolename</b></span>),
    webGrid.Column("Role Description", "Role Description", format: @<span class="roledescription"><b>@item.RoleDescription</b></span>),
    webGrid.Column(header: "Action",
            style: "action",
            format: (item) => new HtmlString(Html.ActionLink("View", "View", new { id = item.roleidPK }, new { @class = "" }) + " | " +
                Html.ActionLink("Edit", "Edit", new { id = item.roleidPK }) + " | " +
            Html.ActionLink("Delete", "Delete", new { id = item.roleidPK }, new { @class="deleteLink" })
                    ))))

          </div>
